# -*- coding: utf-8 -*-

from functools import reduce

print('''str1
str2
str3
''')

print(r'''hello,\n
world''')

print(ord('A'))

print(chr(65))

print("hello %s" % "world")
print("hi %s, good %s" % ("Jack", "job"))


# 返回2个值
def re(arg1, arg2):
    return arg1 + 1, arg2 + 1


x, y = re(1, 2)
print(x, y)


def triangles(c):
    l = [1]
    i = 0
    while i < c:
        i += 1
        yield l
        l = [sum(i) for i in zip([0] + l, l + [0])]


for t in triangles(10):
    print(t)


def fn(arg1, arg2):
    print(arg1, arg2)
    return arg1 * 10 + arg2


ll = [1, 2, 3, 4]

reduce(fn, ll)
